From 398e76ea482be59d1b9925b929ce65e1f84caab2 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 4 Jan 2001 13:03:34 +0000 Subject: [PATCH] (set_font_frame_param): Don't do anything for non-graphical frames. --- src/xfaces.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index c510885254b..65f912ef24d 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -4197,24 +4197,28 @@ set_font_frame_param (frame, lface) Lisp_Object frame, lface; { struct frame *f = XFRAME (frame); - Lisp_Object font_name; - char *font; - if (STRINGP (LFACE_FONT (lface))) - font_name = LFACE_FONT (lface); - else + if (FRAME_WINDOW_P (f)) { - /* Choose a font name that reflects LFACE's attributes and has - the registry and encoding pattern specified in the default - fontset (3rd arg: -1) for ASCII characters (4th arg: 0). */ - font = choose_face_font (f, XVECTOR (lface)->contents, -1, 0); - if (!font) - error ("No font matches the specified attribute"); - font_name = build_string (font); - xfree (font); - } + Lisp_Object font_name; + char *font; + + if (STRINGP (LFACE_FONT (lface))) + font_name = LFACE_FONT (lface); + else + { + /* Choose a font name that reflects LFACE's attributes and has + the registry and encoding pattern specified in the default + fontset (3rd arg: -1) for ASCII characters (4th arg: 0). */ + font = choose_face_font (f, XVECTOR (lface)->contents, -1, 0); + if (!font) + error ("No font matches the specified attribute"); + font_name = build_string (font); + xfree (font); + } - Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font_name), Qnil)); + Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font_name), Qnil)); + } } -- 2.30.2